package com.wj.algorithm.redmoney.one;


/**
 * @author Smile.Wu
 * @date 2016年2月17日  下午12:03:01
 */
public class RandomMoneyApp {

	public static void main(String[] args) {
		int peoples = 20;
		double money = 220;
		RandomMoney randomMoney = new RandomMoney(peoples, money);
		
		double m = -1;
		int c = 1;
		
		long begin = System.nanoTime();
		while((m = RandomMoneyUtil.random(randomMoney)) > 0) {
			System.out.println(c + " : " + m);
			c ++;
		}
		
		System.out.println("peoples : " + peoples);
		System.out.println("money : " + money);
		
		long cost = System.nanoTime() - begin;
		System.out.println("cost : " + (cost  / 1000000) + " ms.");
	}
}
